package com.zhang.servicedriveruser.controller;


import com.zhang.internalcommon.dto.DriverCarBindingRelationship;
import com.zhang.internalcommon.dto.ResponseResult;
import com.zhang.servicedriveruser.service.IDriverCarBindingRelationshipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张开琦
 * @since 2025-04-12
 */
@RestController
@RequestMapping("driver-car-binding-relationship")
public class DriverCarBindingRelationshipController {
	@Autowired
	private IDriverCarBindingRelationshipService driverCarBindingRelationshipService;

	@PostMapping("/bind")
	public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
		ResponseResult bind = driverCarBindingRelationshipService.bind(driverCarBindingRelationship);
		return bind;
	}

	@PostMapping("/unbind")
	public ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
		return driverCarBindingRelationshipService.unbind(driverCarBindingRelationship);
	}
}
